import java.util.Scanner;
public class Fifth{
	public static void main(String[] args){
	Scanner sc =new Scanner(System.in);
	System.out.println("Please enter the grade:");
	Double grade =sc.nextDouble();
	if(grade<0||grade>100){	
	System.out.println("Eeinput error,please re-enter!");
	}else if (grade <0||grade<=59){
	System.out.println("C");
	}else if (grade >=60||grade<=80){
	System.out.println("B");
	}else{
	System.out.println("A");
	}
	}
}